package com.kilograms.lensflareit.view;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.view.View;

public class LensflareImageView extends View {	
	int width;
	int height;
	int flareX;
	int flareY;
	
	Bitmap bottomImage;
	Bitmap topImage;
	
	public LensflareImageView(Context context, Bitmap botImg, Bitmap topImg, int width, int height) {
		super(context);
		
		this.width = width;
		this.height = height;
		
		bottomImage = botImg;
		topImage = topImg;
	}

	@Override
	protected void onDraw(Canvas canvas) {
		// TODO Auto-generated method stub
		super.onDraw(canvas);
		if(bottomImage != null)
			canvas.drawBitmap(bottomImage, new Matrix(), null);
		if(topImage != null)
			canvas.drawBitmap(topImage, new Matrix(), null);
	}

	@Override
	protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
		// TODO Auto-generated method stub
		super.onMeasure(widthMeasureSpec, heightMeasureSpec);
	}
	
	public void setBottomImage(Bitmap bottomImage) {
		this.bottomImage = bottomImage;
	}

	public void setTopImage(Bitmap topImage) {
		this.topImage = topImage;
	}

}
